package com.cet.designapplication.deprecated.observer;

import com.cet.designapplication.deprecated.DeprecatedConstants;
import org.springframework.jdbc.object.UpdatableSqlQuery;
import org.springframework.statemachine.config.configurers.DefaultConfigurationConfigurer;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author NSOC
 */

@Component
public class DeprecatedSendObserver extends DeprecatedAbstractObserver {

    @PostConstruct
    public void init() {
        DeprecatedConstants.OBSERVER_LIST.add(this);
    }

    @Override
    public void orderStateHandle(String orderId, String orderState) {
        if (!"ORDER_WAIT_RECEIVE".equals(orderState)) {
            return;
        }
        System.out.println("监听到：订单发送成功。通过命令模式做后续处理。");
    }
}
